1. Field of the Invention
The present invention relates to a process for coding characters and associated display attributes in a video system making it possible to display text or graphics in a video image. The invention also concerns a device for generating characters in a video system implementing this process.
2. Description of the Related Art
The displaying of characters on a video screen is necessary in particular for applications in which the video image is replaced by text intended to supply the user with information, but also for producing subtitles incorporated into a video image, for example to improve the comfort of the hard of hearing. Another application relates to the displaying of menus for adjusting television monitors which guide the user step by step so that he can easily adjust his television receiver.
These various applications require an ever more meticulous display involving an increase in both the size of the character sets available and the number of display parameters defining the color and the shape of each character displayed.
Known character generators generally possess a read-only memory (ROM), termed the character font memory, in which are stored the various models of characters available, in the form of matrices where each intersection represents a pixel, some pixels representing the shape of the character and others representing the background of the character.
The codes of the characters to be displayed are stored in a random-access memory (RAM) which supplies the above described read-only memory with the code of the character.
The appearance of the characters on the screen is governed by parameters called display attributes which define the color of the characters or their aspect on the screen. It is thus possible in particular to define the color of the shape and/or of the background of the character, the size (single, double), underlining, the displaying of a dark outline around the shape of the character, the flashing of the character, etc. by virtue of these display attributes. The display attributes defining the aspect of the characters on the screen will hereinafter be referred to as shape attributes whilst the attributes defining the colour of the background or of the shape of the character will be referred to as colour attributes.
In the prior art, it has been proposed to code the characters over one byte (one word 8 bits long) and to transmit the display attributes in so-called xe2x80x9cserialxe2x80x9d mode, that is to say that the cue coded over one byte contains either the code of a character to be displayed, or a code corresponding to a display attribute which is to be used for the next word. The display attribute codes are transmitted only when no character is displayed, that is to say between the words.
This mode of coding is very economical in terms of necessary memory space but it provides very few display possibilities. This is because each word necessarily has a unique colour and aspect and only one parameter out of the colour (of the background or of the shape of the characters) or the aspect can be changed from one word to the next.
To offer more display possibilities it has also been proposed to use a coding over two bytes, the first byte containing, as above, either a code of a character to be displayed, or a display attribute code transmitted in serial mode, called a serial attribute, and the second byte containing a so-called xe2x80x9cparallelxe2x80x9d display attribute code containing both a shape attribute and a colour attribute for defining the aspect and the colour of the character defined in the first byte.
This solution is effective in increasing the display possibilities by making it possible to define a background colour and shape colour as well as an aspect which is specific to each character. However, the choice of colours and display aspects is limited by the one-byte size reserved for the shape and colour attributes.
One object of the invention is to improve the display possibilities by offering a wider choice of colours and shapes so as to define the appearance of the characters on the screen and to do so at negligible additional cost as compared with the prior art.
The subject of the invention is a process for coding characters and associated display attributes in a video system consisting in:
coding a first cue of character type in a first word N bits long;
coding a second cue of display attribute type, a so-called parallel attribute, defining the colour or aspect associated with a character, in a second word, M bits long, comprising at least one selection bit whose value indicates whether the parallel display attribute transmitted is a colour attribute or a shape attribute;
storing the value of the parallel display attribute;
using, for display of the current character, the colour attribute, respectively the shape attribute, transmitted at the same time as the current character, or by default, the colour attribute, respectively the shape attribute, stored during transmission of a previous character.
An advantage of the invention is that it offers a greater choice in the display possibilities whilst requiring, as compared with the prior art, a memory space of size equal to only a parallel display attribute code.
According to a preferred embodiment of the invention, the value of the parallel display attribute transmitted is stored by a first storage means if it is a colour attribute and by second storage means if it is a shape attribute.
Thus, there is a storage means for the colour attribute and a storage means for the shape attribute. The colour attribute (respectively shape attribute) stored serves to define the appearance of the character transmitted in the first word to the screen when the second word contains a shape attribute (respectively a colour attribute). Moreover, during each character transmission it is possible to modify the value of the colour attribute stored or of the shape attribute stored, depending on the type of parallel attribute which is transmitted.
According to a particular embodiment, the parallel display attribute is stored by the second storage means only if at least two consecutive parallel display attributes transmitted are of shape attribute type.
Advantageously, the penultimate of the at least two consecutive parallel display attributes of shape attribute type is stored by the second storage means.
According to another particular embodiment, the parallel display attribute is stored by the first storage means only if at least two consecutive parallel display attributes transmitted are of colour attribute type.
Advantageously, the penultimate of the at least two consecutive parallel display attributes of colour attribute type is stored by the first storage means.
By virtue of these arrangements, it is possible, as will be seen later in the example of FIG. 2, to modify both the colour and the shape between two consecutive characters.
According to a particular embodiment, the parallel display attribute transmitted in the second word is stored directly by the appropriate storage means only when a predetermined specific character code is transmitted in the first word.
Thus, it is possible to force storage of the parallel display attribute when necessary, without waiting to have two consecutive attributes of the same type (shape attribute or colour attribute).
Advantageously, the predetermined specific character code corresponds to the space character.
According to a particular embodiment, the predetermined specific character code belongs to a subset among the serial display attribute codes.
According to a particular embodiment, the first and the second word are of equal length (N=M bits).
Advantageously, the first and the second word are 8 bits long.
According to a particular embodiment, a device for generating characters in a video system implementing the process according to the invention comprises:
a) a memory in which are held the codes of the characters to be displayed and the codes of the parallel display attributes of the characters, the display attributes being of the shape attribute type or of the colour attribute type, the memory comprising as output a character data bus and an attribute data bus;
b) an attribute decoding circuit which receives the attribute data bus as input and comprises
a decoder of the attribute type transmitted and
at least one memory for storing a display attribute received,
xe2x80x83the decoder outputting to a shape attribute data bus and to a colour attribute data bus, either the code of the attribute received from the attribute data bus, or the code of the attribute stored, depending on the type of attribute transmitted on the attribute data bus;
c) a read-only memory containing the character models and receiving as input the character data bus;
d) a pixel processor receiving from the read-only memory, by way of a shift register, data bits corresponding to the character models, and receiving check bits for the shape and colour attribute buses, the pixel processor deriving the RGB signals corresponding to the text to be displayed.
According to a particular embodiment, the said device comprises a first memory for storing the colour attributes and a second memory for storing the shape attributes.
According to a particular embodiment, the device furthermore comprises a first and a second multiplexers, which are controlled by the decoder of the type of attribute transmitted, the code of the attribute received from the attribute data bus being transmitted:
either to the colour attribute bus by the first multiplexer, the shape attribute bus receiving the shape attribute stored in the second memory by way of the second multiplexer;
or to the shape attribute bus by the second multiplexer, the colour attribute bus receiving the colour attribute stored in the first memory by way of the first multiplexer.
According to a particular embodiment, the device furthermore comprises a memory for storing the previous shape attribute transmitted on the shape attribute bus, the previous shape attribute being stored in the second memory only when two attributes transmitted consecutively on the attribute data bus are of shape attribute type.
According to a particular embodiment, the decoder of the type of attribute transmitted comprises as output a line received on a first input of a logic AND, the second input of the logic AND receiving the line after a delay corresponding to the duration of transmission of a character, the output of the logic AND indicating whether two consecutive attributes of shape type have been transmitted and controlling a third multiplexer, which delivers either the previous shape attribute, or the shape attribute already stored to the second memory.
According to a particular embodiment, the device furthermore comprises a decoder module for decoding the character code transmitted on the character data bus, the decoder module controlling a fourth multiplexer so as directly to store the shape attribute transmitted on the attribute data bus when a predetermined specific character code is detected.